package com.cqggrw.action;

import com.cqggrw.domain.About;
import com.cqggrw.domain.Json;
import com.cqggrw.service.AboutServiceI;
import com.cqggrw.service.impl.AboutServiceImpl;
import com.opensymphony.xwork2.ModelDriven;

public class AboutAction extends BaseAction implements ModelDriven<About> {

	private static final long serialVersionUID = 5280189720149685830L;
	
	private AboutServiceI service = new AboutServiceImpl();
	public About about = new About();
	
	public void get() {
		super.writeJson(service.getList());
	}
	
	public void getById() {
		super.writeJson(service.getById(about.getId()));
	}
	
	public String modify() {
		service.modify(about);
		return "modifySuccess";
	}

	public About getModel() {
		return about;
	}

}
